Integrand size = 33, antiderivative size = 129 \[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{(a+a \cos (c+d x))^3} \, dx=-\frac {3 A \text {arctanh}(\sin (c+d x))}{a^3 d}+\frac {2 (36 A+C) \tan (c+d x)}{15 a^3 d}-\frac {(A+C) \tan (c+d x)}{5 d (a+a \cos (c+d x))^3}-\frac {(9 A-C) \tan (c+d x)}{15 a d (a+a \cos (c+d x))^2}-\frac {3 A \tan (c+d x)}{d \left (a^3+a^3 \cos (c+d x)\right )} \]
-3*A*arctanh(sin(d*x+c))/a^3/d+2/15*(36*A+C)*tan(d*x+c)/a^3/d-1/5*(A+C)*ta n(d*x+c)/d/(a+a*cos(d*x+c))^3-1/15*(9*A-C)*tan(d*x+c)/a/d/(a+a*cos(d*x+c)) ^2-3*A*tan(d*x+c)/d/(a^3+a^3*cos(d*x+c))
Leaf count is larger than twice the leaf count of optimal. \(457\) vs. \(2(129)=258\).
Time = 5.68 (sec) , antiderivative size = 457, normalized size of antiderivative = 3.54 \[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{(a+a \cos (c+d x))^3} \, dx=\frac {\left (A+C \cos ^2(c+d x)\right ) \sec (c+d x) \left (2880 A \cos ^6\left (\frac {1}{2} (c+d x)\right ) \cos (c+d x) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+\cos \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {c}{2}\right ) \sec (c) \left (-5 (51 A+4 C) \sin \left (\frac {d x}{2}\right )+(567 A+22 C) \sin \left (\frac {3 d x}{2}\right )-600 A \sin \left (c-\frac {d x}{2}\right )-10 C \sin \left (c-\frac {d x}{2}\right )+375 A \sin \left (c+\frac {d x}{2}\right )+10 C \sin \left (c+\frac {d x}{2}\right )-480 A \sin \left (2 c+\frac {d x}{2}\right )-20 C \sin \left (2 c+\frac {d x}{2}\right )-60 A \sin \left (c+\frac {3 d x}{2}\right )+402 A \sin \left (2 c+\frac {3 d x}{2}\right )+22 C \sin \left (2 c+\frac {3 d x}{2}\right )-225 A \sin \left (3 c+\frac {3 d x}{2}\right )+315 A \sin \left (c+\frac {5 d x}{2}\right )+10 C \sin \left (c+\frac {5 d x}{2}\right )+30 A \sin \left (2 c+\frac {5 d x}{2}\right )+240 A \sin \left (3 c+\frac {5 d x}{2}\right )+10 C \sin \left (3 c+\frac {5 d x}{2}\right )-45 A \sin \left (4 c+\frac {5 d x}{2}\right )+72 A \sin \left (2 c+\frac {7 d x}{2}\right )+2 C \sin \left (2 c+\frac {7 d x}{2}\right )+15 A \sin \left (3 c+\frac {7 d x}{2}\right )+57 A \sin \left (4 c+\frac {7 d x}{2}\right )+2 C \sin \left (4 c+\frac {7 d x}{2}\right )\right )\right )}{60 a^3 d (1+\cos (c+d x))^3 (2 A+C+C \cos (2 (c+d x)))} \]
((A + C*Cos[c + d*x]^2)*Sec[c + d*x]*(2880*A*Cos[(c + d*x)/2]^6*Cos[c + d* x]*(Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] - Log[Cos[(c + d*x)/2] + Sin[ (c + d*x)/2]]) + Cos[(c + d*x)/2]*Sec[c/2]*Sec[c]*(-5*(51*A + 4*C)*Sin[(d* x)/2] + (567*A + 22*C)*Sin[(3*d*x)/2] - 600*A*Sin[c - (d*x)/2] - 10*C*Sin[ c - (d*x)/2] + 375*A*Sin[c + (d*x)/2] + 10*C*Sin[c + (d*x)/2] - 480*A*Sin[ 2*c + (d*x)/2] - 20*C*Sin[2*c + (d*x)/2] - 60*A*Sin[c + (3*d*x)/2] + 402*A *Sin[2*c + (3*d*x)/2] + 22*C*Sin[2*c + (3*d*x)/2] - 225*A*Sin[3*c + (3*d*x )/2] + 315*A*Sin[c + (5*d*x)/2] + 10*C*Sin[c + (5*d*x)/2] + 30*A*Sin[2*c + (5*d*x)/2] + 240*A*Sin[3*c + (5*d*x)/2] + 10*C*Sin[3*c + (5*d*x)/2] - 45* A*Sin[4*c + (5*d*x)/2] + 72*A*Sin[2*c + (7*d*x)/2] + 2*C*Sin[2*c + (7*d*x) /2] + 15*A*Sin[3*c + (7*d*x)/2] + 57*A*Sin[4*c + (7*d*x)/2] + 2*C*Sin[4*c + (7*d*x)/2])))/(60*a^3*d*(1 + Cos[c + d*x])^3*(2*A + C + C*Cos[2*(c + d*x )]))
Time = 1.08 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.12, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {3042, 3521, 3042, 3457, 3042, 3457, 3042, 3227, 3042, 4254, 24, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a \cos (c+d x)+a)^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+C \sin \left (c+d x+\frac {\pi }{2}\right )^2}{\sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^3}dx\) |
\(\Big \downarrow \) 3521 |
\(\displaystyle \frac {\int \frac {(a (6 A+C)-a (3 A-2 C) \cos (c+d x)) \sec ^2(c+d x)}{(\cos (c+d x) a+a)^2}dx}{5 a^2}-\frac {(A+C) \tan (c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {a (6 A+C)-a (3 A-2 C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2}dx}{5 a^2}-\frac {(A+C) \tan (c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3457 |
\(\displaystyle \frac {\frac {\int \frac {\left (a^2 (27 A+2 C)-2 a^2 (9 A-C) \cos (c+d x)\right ) \sec ^2(c+d x)}{\cos (c+d x) a+a}dx}{3 a^2}-\frac {a (9 A-C) \tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}}{5 a^2}-\frac {(A+C) \tan (c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {a^2 (27 A+2 C)-2 a^2 (9 A-C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )}dx}{3 a^2}-\frac {a (9 A-C) \tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}}{5 a^2}-\frac {(A+C) \tan (c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3457 |
\(\displaystyle \frac {\frac {\frac {\int \left (2 a^3 (36 A+C)-45 a^3 A \cos (c+d x)\right ) \sec ^2(c+d x)dx}{a^2}-\frac {45 a^2 A \tan (c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {a (9 A-C) \tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}}{5 a^2}-\frac {(A+C) \tan (c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\int \frac {2 a^3 (36 A+C)-45 a^3 A \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^2}dx}{a^2}-\frac {45 a^2 A \tan (c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {a (9 A-C) \tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}}{5 a^2}-\frac {(A+C) \tan (c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {\frac {\frac {2 a^3 (36 A+C) \int \sec ^2(c+d x)dx-45 a^3 A \int \sec (c+d x)dx}{a^2}-\frac {45 a^2 A \tan (c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {a (9 A-C) \tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}}{5 a^2}-\frac {(A+C) \tan (c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {2 a^3 (36 A+C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx-45 a^3 A \int \csc \left (c+d x+\frac {\pi }{2}\right )dx}{a^2}-\frac {45 a^2 A \tan (c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {a (9 A-C) \tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}}{5 a^2}-\frac {(A+C) \tan (c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {\frac {\frac {-\frac {2 a^3 (36 A+C) \int 1d(-\tan (c+d x))}{d}-45 a^3 A \int \csc \left (c+d x+\frac {\pi }{2}\right )dx}{a^2}-\frac {45 a^2 A \tan (c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {a (9 A-C) \tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}}{5 a^2}-\frac {(A+C) \tan (c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\frac {\frac {\frac {2 a^3 (36 A+C) \tan (c+d x)}{d}-45 a^3 A \int \csc \left (c+d x+\frac {\pi }{2}\right )dx}{a^2}-\frac {45 a^2 A \tan (c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {a (9 A-C) \tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}}{5 a^2}-\frac {(A+C) \tan (c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {\frac {\frac {\frac {2 a^3 (36 A+C) \tan (c+d x)}{d}-\frac {45 a^3 A \text {arctanh}(\sin (c+d x))}{d}}{a^2}-\frac {45 a^2 A \tan (c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {a (9 A-C) \tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}}{5 a^2}-\frac {(A+C) \tan (c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
-1/5*((A + C)*Tan[c + d*x])/(d*(a + a*Cos[c + d*x])^3) + (-1/3*(a*(9*A - C )*Tan[c + d*x])/(d*(a + a*Cos[c + d*x])^2) + ((-45*a^2*A*Tan[c + d*x])/(d* (a + a*Cos[c + d*x])) + ((-45*a^3*A*ArcTanh[Sin[c + d*x]])/d + (2*a^3*(36* A + C)*Tan[c + d*x])/d)/a^2)/(3*a^2))/(5*a^2)
3.1.62.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[b*(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^( n + 1)/(a*f*(2*m + 1)*(b*c - a*d))), x] + Simp[1/(a*(2*m + 1)*(b*c - a*d)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[B*(a*c*m + b *d*(n + 1)) + A*(b*c*(m + 1) - a*d*(2*m + n + 2)) + d*(A*b - a*B)*(m + n + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ [b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] && !GtQ[n, 0] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[a*(A + C)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(f*(b*c - a*d)*(2*m + 1))), x] + Simp[1/(b*(b*c - a*d)*(2*m + 1)) I nt[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[A*(a*c*(m + 1) - b*d*(2*m + n + 2)) - C*(a*c*m + b*d*(n + 1)) + (a*A*d*(m + n + 2) + C*(b* c*(2*m + 1) - a*d*(m - n - 1)))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, C, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 2.40 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.05
method | result | size |
parallelrisch | \(\frac {360 A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \cos \left (d x +c \right )-360 A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \cos \left (d x +c \right )+342 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\left (\frac {A}{2}+\frac {C}{57}\right ) \cos \left (2 d x +2 c \right )+\left (\frac {2 A}{19}+\frac {C}{342}\right ) \cos \left (3 d x +3 c \right )+\left (A +\frac {17 C}{342}\right ) \cos \left (d x +c \right )+\frac {67 A}{114}+\frac {C}{57}\right ) \left (\sec ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{120 d \,a^{3} \cos \left (d x +c \right )}\) | \(135\) |
derivativedivides | \(\frac {\frac {A \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}+\frac {\left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{5}+2 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A +\frac {2 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{3}+17 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C -\frac {4 A}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-12 A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {4 A}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+12 A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{4 d \,a^{3}}\) | \(151\) |
default | \(\frac {\frac {A \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}+\frac {\left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{5}+2 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A +\frac {2 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{3}+17 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C -\frac {4 A}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-12 A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {4 A}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+12 A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{4 d \,a^{3}}\) | \(151\) |
risch | \(\frac {2 i \left (45 A \,{\mathrm e}^{6 i \left (d x +c \right )}+225 A \,{\mathrm e}^{5 i \left (d x +c \right )}+480 A \,{\mathrm e}^{4 i \left (d x +c \right )}+20 C \,{\mathrm e}^{4 i \left (d x +c \right )}+600 A \,{\mathrm e}^{3 i \left (d x +c \right )}+10 C \,{\mathrm e}^{3 i \left (d x +c \right )}+567 A \,{\mathrm e}^{2 i \left (d x +c \right )}+22 C \,{\mathrm e}^{2 i \left (d x +c \right )}+315 A \,{\mathrm e}^{i \left (d x +c \right )}+10 C \,{\mathrm e}^{i \left (d x +c \right )}+72 A +2 C \right )}{15 d \,a^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{5} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {3 A \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{a^{3} d}-\frac {3 A \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{a^{3} d}\) | \(208\) |
norman | \(\frac {\frac {\left (A +C \right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{20 a d}-\frac {5 \left (21 A +C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 a d}-\frac {\left (25 A +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 a d}+\frac {\left (33 A +13 C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{60 a d}+\frac {\left (51 A +C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{30 a d}+\frac {\left (141 A +11 C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{30 a d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a^{2}}+\frac {3 A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a^{3} d}-\frac {3 A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a^{3} d}\) | \(223\) |
1/120*(360*A*ln(tan(1/2*d*x+1/2*c)-1)*cos(d*x+c)-360*A*ln(tan(1/2*d*x+1/2* c)+1)*cos(d*x+c)+342*tan(1/2*d*x+1/2*c)*((1/2*A+1/57*C)*cos(2*d*x+2*c)+(2/ 19*A+1/342*C)*cos(3*d*x+3*c)+(A+17/342*C)*cos(d*x+c)+67/114*A+1/57*C)*sec( 1/2*d*x+1/2*c)^4)/d/a^3/cos(d*x+c)
Time = 0.27 (sec) , antiderivative size = 222, normalized size of antiderivative = 1.72 \[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{(a+a \cos (c+d x))^3} \, dx=-\frac {45 \, {\left (A \cos \left (d x + c\right )^{4} + 3 \, A \cos \left (d x + c\right )^{3} + 3 \, A \cos \left (d x + c\right )^{2} + A \cos \left (d x + c\right )\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 45 \, {\left (A \cos \left (d x + c\right )^{4} + 3 \, A \cos \left (d x + c\right )^{3} + 3 \, A \cos \left (d x + c\right )^{2} + A \cos \left (d x + c\right )\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (2 \, {\left (36 \, A + C\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (57 \, A + 2 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (117 \, A + 7 \, C\right )} \cos \left (d x + c\right ) + 15 \, A\right )} \sin \left (d x + c\right )}{30 \, {\left (a^{3} d \cos \left (d x + c\right )^{4} + 3 \, a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + a^{3} d \cos \left (d x + c\right )\right )}} \]
-1/30*(45*(A*cos(d*x + c)^4 + 3*A*cos(d*x + c)^3 + 3*A*cos(d*x + c)^2 + A* cos(d*x + c))*log(sin(d*x + c) + 1) - 45*(A*cos(d*x + c)^4 + 3*A*cos(d*x + c)^3 + 3*A*cos(d*x + c)^2 + A*cos(d*x + c))*log(-sin(d*x + c) + 1) - 2*(2 *(36*A + C)*cos(d*x + c)^3 + 3*(57*A + 2*C)*cos(d*x + c)^2 + (117*A + 7*C) *cos(d*x + c) + 15*A)*sin(d*x + c))/(a^3*d*cos(d*x + c)^4 + 3*a^3*d*cos(d* x + c)^3 + 3*a^3*d*cos(d*x + c)^2 + a^3*d*cos(d*x + c))
\[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{(a+a \cos (c+d x))^3} \, dx=\frac {\int \frac {A \sec ^{2}{\left (c + d x \right )}}{\cos ^{3}{\left (c + d x \right )} + 3 \cos ^{2}{\left (c + d x \right )} + 3 \cos {\left (c + d x \right )} + 1}\, dx + \int \frac {C \cos ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{\cos ^{3}{\left (c + d x \right )} + 3 \cos ^{2}{\left (c + d x \right )} + 3 \cos {\left (c + d x \right )} + 1}\, dx}{a^{3}} \]
(Integral(A*sec(c + d*x)**2/(cos(c + d*x)**3 + 3*cos(c + d*x)**2 + 3*cos(c + d*x) + 1), x) + Integral(C*cos(c + d*x)**2*sec(c + d*x)**2/(cos(c + d*x )**3 + 3*cos(c + d*x)**2 + 3*cos(c + d*x) + 1), x))/a**3
Time = 0.22 (sec) , antiderivative size = 233, normalized size of antiderivative = 1.81 \[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{(a+a \cos (c+d x))^3} \, dx=\frac {3 \, A {\left (\frac {40 \, \sin \left (d x + c\right )}{{\left (a^{3} - \frac {a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} + \frac {\frac {85 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {10 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {\sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a^{3}} - \frac {60 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{3}} + \frac {60 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{3}}\right )} + \frac {C {\left (\frac {15 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {10 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a^{3}}}{60 \, d} \]
1/60*(3*A*(40*sin(d*x + c)/((a^3 - a^3*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 )*(cos(d*x + c) + 1)) + (85*sin(d*x + c)/(cos(d*x + c) + 1) + 10*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/a^3 - 60 *log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a^3 + 60*log(sin(d*x + c)/(cos(d *x + c) + 1) - 1)/a^3) + C*(15*sin(d*x + c)/(cos(d*x + c) + 1) + 10*sin(d* x + c)^3/(cos(d*x + c) + 1)^3 + 3*sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/a^3 )/d
Time = 0.29 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.38 \[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{(a+a \cos (c+d x))^3} \, dx=-\frac {\frac {180 \, A \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{3}} - \frac {180 \, A \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{3}} + \frac {120 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} a^{3}} - \frac {3 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 30 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 10 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 255 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 15 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{15}}}{60 \, d} \]
-1/60*(180*A*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^3 - 180*A*log(abs(tan(1/ 2*d*x + 1/2*c) - 1))/a^3 + 120*A*tan(1/2*d*x + 1/2*c)/((tan(1/2*d*x + 1/2* c)^2 - 1)*a^3) - (3*A*a^12*tan(1/2*d*x + 1/2*c)^5 + 3*C*a^12*tan(1/2*d*x + 1/2*c)^5 + 30*A*a^12*tan(1/2*d*x + 1/2*c)^3 + 10*C*a^12*tan(1/2*d*x + 1/2 *c)^3 + 255*A*a^12*tan(1/2*d*x + 1/2*c) + 15*C*a^12*tan(1/2*d*x + 1/2*c))/ a^15)/d
Time = 1.10 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.16 \[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{(a+a \cos (c+d x))^3} \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {A+C}{6\,a^3}+\frac {A}{3\,a^3}\right )}{d}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {3\,\left (A+C\right )}{4\,a^3}+\frac {2\,A}{a^3}+\frac {6\,A-2\,C}{4\,a^3}\right )}{d}-\frac {6\,A\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^3\,d}-\frac {2\,A\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-a^3\right )}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (A+C\right )}{20\,a^3\,d} \]